Empfindung - Quantify colour differences in Rust
Empfindung is a library providing implementations of colour difference algorithms. Specifically, distances based on L*a*b* colour space often referred to as ΔE*. (This is also where the package gets its name. The ‘E’ stands for German ‘Empfindung’).
The crate provides CIEDE2000, CIE94, CIE76 and CMC l:c implementations.
Installation
If you're using Cargo, just add DeltaE to your Cargo.toml
:
[]
= "0.2"
Example
use cie00;
Crate Features
The crate defines lab
and rgb
features which are enabled by
default. The former adds dependency on the lab
crate and allows
functions to take lab::Lab
arguments. The latter adds dependency on
rgb
crate and further allows functions to take rgb::RGB<u8>
arguments.
About
This crate was originally written by Elliot
Jackson and later forked by Michał
Nazarewicz after long inactivity. Aside from the
package name change, it is a drop-in replacement for the delta_e
create.
A quick migrating from to empfindung
can be performed via use
declaration as follows:
use empfindung as delta_e;
or changing the paths to use the new crate name. In particular, if
use delta_e::DE2000;
declaration is used, it’s enough to replace it
by the following without having to touch the rest of the code:
use DE2000; // was use delta_e::DE2000;
Having said that, the DE2000
structure is now deprecated and it’s
better to use empfindung::cie00::diff
directly.
License
Empfindung is released under the MIT license, See LICENSE
file.